home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-SPAR.{_A / PBM.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  95 lines

  1. /* $Id: pbm.h,v 1.16 1999/03/14 18:13:03 davem Exp $
  2.  * pbm.h: U2P PCI bus module pseudo driver software state.
  3.  *
  4.  * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
  5.  */
  6.  
  7. #ifndef __SPARC64_PBM_H
  8. #define __SPARC64_PBM_H
  9.  
  10. #include <linux/pci.h>
  11.  
  12. #include <asm/psycho.h>
  13. #include <asm/oplib.h>
  14.  
  15. struct linux_pbm_info;
  16.  
  17. /* This is what we use to determine what the PROM has assigned so
  18.  * far, so that we can perform assignments for addresses which
  19.  * were not taken care of by OBP.  See psycho.c for details.
  20.  * Per-PBM these are ordered by start address.
  21.  */
  22. struct pci_vma {
  23.     struct pci_vma            *next;
  24.     struct linux_pbm_info        *pbm;
  25.     unsigned int            start;
  26.     unsigned int            end;
  27.     unsigned int            offset;
  28.     unsigned int            _pad;
  29. };
  30.  
  31. struct linux_psycho;
  32.  
  33. /* There can be quite a few ranges and interrupt maps on a PCI
  34.  * segment.  Thus...
  35.  */
  36. #define PROM_PCIRNG_MAX        64
  37. #define PROM_PCIIMAP_MAX    64
  38.  
  39. struct linux_pbm_info {
  40.     struct linux_psycho        *parent;
  41.     struct pci_vma            *IO_assignments;
  42.     struct pci_vma            *MEM_assignments;
  43.     int                prom_node;
  44.     char                prom_name[64];
  45.     struct linux_prom_pci_ranges    pbm_ranges[PROM_PCIRNG_MAX];
  46.     int                num_pbm_ranges;
  47.     struct linux_prom_pci_intmap    pbm_intmap[PROM_PCIIMAP_MAX];
  48.     int                num_pbm_intmap;
  49.     struct linux_prom_pci_intmask    pbm_intmask;
  50.  
  51.     /* Now things for the actual PCI bus probes. */
  52.     unsigned int            pci_first_busno;
  53.     unsigned int            pci_last_busno;
  54.     struct pci_bus            pci_bus;
  55. };
  56.  
  57. struct linux_psycho {
  58.     struct linux_psycho        *next;
  59.     struct psycho_regs        *psycho_regs;
  60.     unsigned long            *pci_config_space;
  61.     unsigned long            *pci_IO_space;
  62.     unsigned long            *pci_mem_space;
  63.     u32                upa_portid;
  64.     int                index;
  65.     struct linux_pbm_info        pbm_A;
  66.     struct linux_pbm_info        pbm_B;
  67.  
  68.     /* Now things for the actual PCI bus probes. */
  69.     unsigned int            pci_first_busno;
  70.     unsigned int            pci_last_busno;
  71.     struct pci_bus            *pci_bus;
  72.  
  73.     void                *starfire_cookie;
  74. };
  75.  
  76. /* PCI devices which are not bridges have this placed in their pci_dev
  77.  * sysdata member.  This makes OBP aware PCI device drivers easier to
  78.  * code.
  79.  */
  80. struct pcidev_cookie {
  81.     struct linux_pbm_info        *pbm;
  82.     int                prom_node;
  83. };
  84.  
  85.  
  86. #define PCI_IRQ_IGN    0x000007c0    /* PSYCHO "Int Group Number". */
  87. #define PCI_IRQ_INO    0x0000003f    /* PSYCHO INO.                */
  88.  
  89. /* Used by EBus */
  90. extern unsigned int psycho_irq_build(struct linux_pbm_info *pbm,
  91.                      struct pci_dev *pdev,
  92.                      unsigned int full_ino);
  93.  
  94. #endif /* !(__SPARC64_PBM_H) */
  95.